package com.gutsyzhan.bilibili.dao;

import com.gutsyzhan.bilibili.domain.auth.RefreshToken;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

@Mapper
public interface RefreshTokenDao {
    RefreshToken getRefreshToken(@Param("userId") Long userId, @Param("refreshToken")String refreshToken, @Param("deleteFlag")Integer deleteFlag);

    Integer updateRefreshToken(@Param("userId")Long userId, @Param("refreshToken")String refreshToken, @Param("deleteFlag")Integer deleteFlag, @Param("updateTime") Date updateTime);

    Integer addRefreshToken(@Param("userId")Long userId, @Param("refreshToken")String refreshToken, @Param("createTime") Date createTime);
}
